﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Converters="clr-namespace:SqlExport.View.Converters"
                    xmlns:SqlExport="clr-namespace:SqlExport">

    <Converters:ImageToBitmapImageConverter x:Key="ImageToBitmapImageConverter"/>
    <Converters:StringToResourceConverter x:Key="StringToResourceConverter"/>
    <Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <Converters:NullToBooleanConverter x:Key="NullToBooleanConverter"/>
    <Converters:BooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" Not="True"/>
    <Converters:ConnectionDescriptionValueConverter x:Key="ConnectionDescriptionValueConverter"/>
    <Converters:DatabaseColourValueConverter x:Key="DatabaseColourValueConverter"/>

    <BitmapImage x:Key="SplashScreenBitmap" UriSource="/SQLExport;component/Resources/SplashScreen.gif"/>
    <BitmapImage x:Key="QueryRunningBitmap" UriSource="/SQLExport;component/Resources/cog.png" />
    <BitmapImage x:Key="QueryConnectedBitmap" UriSource="/SQLExport;component/Resources/connect.png" />
    <BitmapImage x:Key="QueryTransactionBitmap" UriSource="/SQLExport;component/Resources/table_lightning.png" />
    <BitmapImage x:Key="QueryStoppedBitmap" UriSource="/SQLExport;component/Resources/stop.png" />
    <BitmapImage x:Key="DatabaseBitmap" UriSource="/SQLExport;component/Resources/database.png"/>
    <BitmapImage x:Key="FolderBitmap" UriSource="/SQLExport;component/Resources/folder.png"/>
    <BitmapImage x:Key="FolderOpenBitmap" UriSource="/SQLExport;component/Resources/folder_page_white.png"/>
    <BitmapImage x:Key="DatabaseTableBitmap" UriSource="/SQLExport;component/Resources/database_table.png"/>
    <BitmapImage x:Key="TableFindBitmap" UriSource="/SQLExport;component/Resources/table_find.png"/>
    <BitmapImage x:Key="BlackBulletBitmap" UriSource="/SQLExport;component/Resources/bullet_black.png"/>
    <BitmapImage x:Key="ScriptGearBitmap" UriSource="/SQLExport;component/Resources/script_Gear.png"/>
    <BitmapImage x:Key="FunctionBitmap" UriSource="/SQLExport;component/Resources/sum.png"/>
    <BitmapImage x:Key="WhitePageBitmap" UriSource="/SQLExport;component/Resources/page_white.png"/>
    <BitmapImage x:Key="ServerBitmap" UriSource="/SQLExport;component/Resources/server.png"/>
    <BitmapImage x:Key="FindBitmap" UriSource="/SQLExport;component/Resources/find.png"/>

    <Image x:Key="AddIcon" Source="/SQLExport;component/Resources/add.png" x:Shared="False"/>
    <Image x:Key="ArrowDownIcon" Source="/SQLExport;component/Resources/arrow_down.png" x:Shared="False"/>
    <Image x:Key="ArrowUpIcon" Source="/SQLExport;component/Resources/arrow_up.png" x:Shared="False"/>
    <Image x:Key="ArrowUndoIcon" Source="/SQLExport;component/Resources/arrow_undo.png" x:Shared="False"/>
    <Image x:Key="ArrowRedoIcon" Source="/SQLExport;component/Resources/arrow_redo.png" x:Shared="False"/>
    <Image x:Key="CloseIcon" Source="/SQLExport;component/Resources/script_delete.png" x:Shared="False"/>
    <Image x:Key="ConnectIcon" Source="/SQLExport;component/Resources/database_connect.png" x:Shared="False"/>
    <Image x:Key="DeleteIcon" Source="/SQLExport;component/Resources/delete.png" x:Shared="False"/>
    <Image x:Key="ExportIcon" Source="/SQLExport;component/Resources/table_go.png" x:Shared="False"/>
    <Image x:Key="NewDocumentIcon" Source="/SQLExport;component/Resources/script_add.png" x:Shared="False"/>
    <Image x:Key="OpenIcon" Source="/SQLExport;component/Resources/folder_page.png" x:Shared="False"/>
    <Image x:Key="RunIcon" Source="/SQLExport;component/Resources/go.png" x:Shared="False"/>
    <Image x:Key="SaveIcon" Source="/SQLExport;component/Resources/script_save.png" x:Shared="False"/>
    <Image x:Key="StopIcon" Source="/SQLExport;component/Resources/stop.png" x:Shared="False"/>
    <Image x:Key="FindIcon" Source="{StaticResource FindBitmap}" x:Shared="False"/>

    <DrawingImage x:Key="EmptyIcon" />

    <Style x:Key="SeparatorStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="1,0,0,0"/>
        <Setter Property="BorderBrush" Value="#FFC5C5C5"/>
        <Setter Property="Margin" Value="10,0,10,0"/>
        <Setter Property="Width" Value="2"/>
        <Setter Property="Background" Value="White"/>
    </Style>

    <Style TargetType="{x:Type Image}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UIElement}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
                <Setter Property="Opacity" Value="0.3"></Setter>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="RunningAnimation" TargetType="{x:Type Image}">
        <Setter Property="RenderTransformOrigin" Value=".5,.5"></Setter>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <RotateTransform x:Name="AnimatedRotateTransform" Angle="0" />
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <EventTrigger RoutedEvent="Image.Loaded">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(RotateTransform.Angle)" 
                                             By="10" To="360" Duration="0:0:4" RepeatBehavior="Forever"/>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>